var wshost = "ws://127.0.0.1:7272";
var ws, name, into_room_id = "public", client_list={}, tokens;
var usertype = 0;
var pass = "";
var isDebug = true;
var client_id = "";
var whereSay = "she", token = "", userid;
var userinfo = {};
var currencyName = "金币";
var barItemArray = ['barItem/home.html', 'barItem/chatrooms.html', 'barItem/sendtouser.html', 'barItem/recharge.html', 'barItem/mime.html'];
var room_connect = function(open_func,message_func,isKeepAlive) {
	isDebug && console.log(isKeepAlive);
	ws = new WebSocket(wshost);
	ws.onopen = open_func;
	ws.onmessage = message_func; 
	ws.onclose = function(e) {
		if(isKeepAlive){
			mui.toast("服务器连接已丢失，将定时重连");
			room_connect(open_func,message_func,isKeepAlive);
		}
	};
	ws.onerror = function(e) {
		mui.toast("连接服务器超时，将稍候重试");
	};
};
var info = new Array();
info[200] = '';
info[10000] = '数据查询失败';
info[10001] = '登录已失效，请重新登录';
info[10002] = '帐号认证失败，请重新登录';
info[10003] = '帐号不存在';
info[10004] = '帐号密码不正确';
info[10005] = '余额不足，请先充值';
info[10006] = '操作失败，请重试';
info[10007] = '玩家红包收取成功';
info[10008] = '玩家红包收取失败，请联系管理员';
info[10009] = '用户名不能为空';
info[10010] = '登录密码不能为空';
info[10011] = '两次密码输入不一致';
info[10012] = '登录帐号已存在，请重试';
info[10013] = '红包金额最低{1}金币，最高{2}金币';
